For displaying three-dimensional representations of objects on a display screen, video graphics systems typically partition each object into geometric primitives. Geometric primitives are elementary graphics building blocks, examples of which include points, lines, images, bitmaps, vectors, and polygons. Triangles are a commonly employed form of primitives. Each primitive is stored as a set of vertices, with each vertex having associated display parameters, including color parameters, display (or pixel) location parameters, and texture parameters. Each primitive passes through a graphics pipeline, in which a rasterizer identifies the pixels corresponding to each primitive.
Three-dimensional scenes can have numerous objects, with many of the objects having thousands of primitives; thus, the rendering process is often computationally intensive and complex. Usually, a 3-D scene has overlapping objects. Depending upon the extent of overlap, opaque objects in the foreground can occlude a portion of or all of an object in the background, causing such objects to be partially or completely invisible from the perspective of the viewer. Accordingly, an important part of the 3D rendering process is the use of depth (i.e., Z) information.
Within a video graphics system, the depth information for the pixels is stored in memory, commonly referred to as a Z buffer. A Z value is stored for each pixel in the Z buffer. The stored Z value represents the pixel presently deemed closest and visible to the viewer. As primitives are processed, pixels with a lesser Z value than the stored Z value are occluded, and are not rendered. An incoming pixel having a higher Z value than the stored Z value is considered closer to the viewer, and, therefore, is rendered. The Z value of this incoming pixel replaces the stored Z value.
Because of the numerous primitives involved in a 3-D scene, the rendering process can require numerous read and write accesses to the Z buffer in order to perform Z value comparisons and replacements. A large number of memory accesses can limit the performance of the rendering process, particularly in video graphics systems in which memory bandwidth is at a premium, such as in handheld devices like personal digital assistants and mobile phones. Reducing the number of accesses to memory can be particularly beneficial to rendering performance in such systems.